import requestProxy from '@/utils/request';

const { request } = requestProxy;

// 人员交接列表
export function getHandoverList(page, perPage, data) {
  return request({
    url: '/admin/handover/record/list',
    method: 'get',
    params: {
      page,
      perPage,
      ...data
    }
  });
}

// 新建交接
export function handoverAdd(data) {
  return request({
    url: '/admin/handover/createTask',
    method: 'post',
    data
  });
}

// 交接详情
export function getHandoverDetail(id) {
  return request({
    url: `/admin/handover/record/${id}`,
    method: 'get'
  });
}

// 查询流程id
export function getWorkflowId(id) {
  return request({
    url: `/admin/handover/workflow/${id}`,
    method: 'get'
  });
}

// 查询供应商id
export function getSupplierId(id) {
  return request({
    url: `/admin/handover/supplier/${id}`,
    method: 'get'
  });
}
